package com.yb.xczx.cloud.auth.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 姚兵
 * @since 2023-05-17
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_role_permission")
@ApiModel(value = "SysRolePermission对象", description = "")
public class SysRolePermission {

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("sys_role.role_id")
    @TableField("role_id")
    private Integer roleId;

    @ApiModelProperty("sys_permission.permission_id")
    @TableField("permission_id")
    private Integer permissionId;

    @ApiModelProperty("sys_user.user_id  如果role_id不存在，则表示为用户单独分配的权限")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("权限归属，0归属角色，1归属用户")
    @TableField("owner")
    private Integer owner;

    @ApiModelProperty("创建日期")
    @TableField("create_time")
    private LocalDateTime createTime;


}
